﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace cadbom
{
    public partial class SelectPDFTypeForm : Form
    {
        Action<int> callback = null;
        int type = 1;
        public SelectPDFTypeForm()
        {
            InitializeComponent();
            this.radioButton1.Checked = true;
        }
        public void initData(Action<int> callback) {
            this.callback = callback;
        }
        private void radioButton3_CheckedChanged(object sender, EventArgs e)
        {

        }

        private void radioButton1_CheckedChanged(object sender, EventArgs e)
        {

        }

        private void button1_Click(object sender, EventArgs e)
        {
            this.Close();
            //工艺图
            if (this.radioButton1.Checked)
            {
                type = 1;
            }
            //物料图
            if (this.radioButton2.Checked)
            {
                type = 2;
            }
            //丝印图
            if (this.radioButton3.Checked)
            {
                type = 3;
            }
            this.callback.Invoke(type);
        }

        private void radioButton2_CheckedChanged(object sender, EventArgs e)
        {

        }
    }
}
